;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; NCL library for radon stuff
;; Kai Zhang, MPI-Met 
;; 2008-2010  
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


;---------------------------------
; mBq/m3 STP -> ion pair/cm3/s STP  
;---------------------------------
function RN222_ionprod(x)
begin

  x = x * 0.001 * 6.4e+05 * 1.0e-06

return(x)
end



;---------------------------------
; mBq/m3 STP <- ion pair/cm3/s STP
;---------------------------------
function RN222_ionprod_conc(x)
begin

  x = x / ( 0.001 * 6.4e+05 * 1.0e-06 ) 

return(x)
end


;---------------------------------
; kg/kg -> mBq/m3 STP
;---------------------------------
function RN222_mBqm3(x)
begin

; kg/kg -> mol/mol
  x = x * 29. / 222. * 1e21
  x@units = "1e-21 mol/mol"

; kg/kg -> mBq/m3 STP
  x = x * 5.6 * 1e-2 * 1000.
  x@units = "mBq/m3 STP"

return(x)
end

;---------------------------------
; kg/kg -> Bq/m3 STP
;---------------------------------
function RN222_Bqm3(x)
begin

; kg/kg -> mol/mol
  x = x * 29. / 222. * 1e21
  x@units = "1e-21 mol/mol"

; kg/kg -> Bq/m3 STP
  x = x * 5.6 * 1e-2
  x@units = "Bq/m3 STP"

return(x)
end

;---------------------------------
; kg/kg -> pCi/m3 STP
;---------------------------------
function RN222_pCim3(x)
begin

; kg/kg -> mol/mol
  x = x * 29. / 222. * 1e21
  x@units    = "1e-21 mol/mol"

; kg/kg -> pCi/m3STP
  x = x * 1.52
  x@units    = "pCi/m3 STP"

return(x)
end




